<?php

    /**
     * Tecdoc
     *
     * @package      Core
     * @subpackage   Svn_Adapter
     *
     * @license      GNU Lesser General Public Licence see LICENCE-LGPL file or http://www.gnu.org/licenses/lgpl.html
     */
	abstract class Core_Svn_Adapter_Abstract
	{

    ////////////////////////////////////////////////////////////////////////////
	//                                Variables                               //
	////////////////////////////////////////////////////////////////////////////

        /**
         * Project name
         *
         * @var     string
         */
        protected $_binary = null;

        /**
         * Project destination
         *
         * @var     string
         */
        protected $_destination = null;

        /**
         * Project source
         *
         * @var     string
         */
        protected $_source = null;

        /**
         * Project login
         *
         * @var     string
         */
        protected $_login = null;

        /**
         * Project password
         *
         * @var     string
         */
        protected $_password = null;

	////////////////////////////////////////////////////////////////////////////
	//                           Getters / Setters                            //
	////////////////////////////////////////////////////////////////////////////

        /**
         * Sets binary
         *
         * @param       string      $binary
         */
        public function setBinary($binary)
        {
            if (!Core_IO_File::exists($binary)) {
                throw new Core_Exception('Fatal error : Binary must exist');
            }

            $this->_binary = $binary;
        }

        /**
         * Gets binary
         *
         * @return       string
         */
        public function getBinary()
        {
            return $this->_binary;
        }

        /**
         * Sets source
         *
         * @param       string      $source
         */
        public function setSource($source)
        {
            $this->_source = $source;
        }

        /**
         * Gets source
         *
         * @return       string
         */
        public function getSource()
        {
            return $this->_source;
        }

        /**
         * Sets destination
         *
         * @param       string      $destination
         */
        public function setDestination($destination)
        {
            $this->_destination = $destination;
        }

        /**
         * Gets destination
         *
         * @return       string
         */
        public function getDestination()
        {
            return $this->_destination;
        }

        /**
         * Sets login
         *
         * @param       string      $login
         */
        public function setLogin($login)
        {
            $this->_login = $login;
        }

        /**
         * Gets login
         *
         * @return       string
         */
        public function getLogin()
        {
            return $this->_login;
        }

        /**
         * Sets password
         *
         * @param       string      $password
         */
        public function setPassword($password)
        {
            $this->_password = $password;
        }

        /**
         * Gets password
         *
         * @return       string
         */
        public function getPassword()
        {
            return $this->_password;
        }

	////////////////////////////////////////////////////////////////////////////
	//                                 Methods                                //
	////////////////////////////////////////////////////////////////////////////

        /**
         * Add
         *
         * @return      string
         */
        public abstract function add($files = '*');

        /**
         * Checkout project
         *
         * @return      string
         */
        public abstract function checkout();

        /**
         * Updates project
         *
         * @return      string
         */
        public abstract function update();

        /**
         * Commits project
         *
         * @return      string
         */
        public abstract function commit($comment = 'Commit from Serum');

        /**
         * Gets status
         *
         * @return      string
         */
        public abstract function status();

        /**
         * Ignores
         *
         * @param       string      $content
         * @param       string      $path
         * @param       boolean     $recursive
         * @return      string
         */
        public abstract function ignore($content, $path = '.', $recursive = false);
	}
